package i_thread;

public class InterruptTest implements Runnable {

	@Override
	public void run() {
		try{
		while( ! Thread.currentThread().interrupted()){
			System.out.println("실행중....");
			Thread.sleep(500);
		}
		}catch(Exception ex){
			
		}finally{
			System.out.println("스레드 중료...");
		}

	}

	public static void main(String[] args) {
		InterruptTest it = new InterruptTest();
		Thread t = new Thread(it);
		t.start();
		try{
			Thread.sleep(3000);
			
		}catch(Exception ex){
			
		}
		t.interrupt();

	}

}
